<!--
 * @Author: 祝肖 1738052358@qq.com
 * @Date: 2024-05-29 11:05:15
 * @LastEditTime: 2024-06-05 16:26:20
 * @LastEditors: 祝肖 1738052358@qq.com
 * @Description: 
 * @FilePath: \zmglpt-ui-mobile-v1.1\dev\pages\query\creditLvAssess\components\historySwiper.vue
 * 可以输入预定的版权声明、个性签名、空行等
-->
<template>
  <view class="page">
    <!-- #ifdef H5-ONLY -->
    <theme-navbar :is-white="false" backText="返回" title="历史信用评定" :custom-back="goBack"></theme-navbar>
    <!-- #endif -->
    <view class="page" v-if="tabIndex == 0">

      <scroll-view :scroll-top="0" :style="{ height: getScrollHeight() }" :scroll-y="true" :scroll-x="false" class="scroll-Y table-body">
        <historyEvalDetail :retailerUuid="retailerUuid"></historyEvalDetail>
      </scroll-view>
    </view>
    <view v-if="tabIndex == 1">
      <scroll-view :scroll-top="0" :style="{ height: getScrollHeight() }" :scroll-y="true" :scroll-x="false" class="scroll-Y table-body">
        <view>
          <historyLvAssessDetail :retailerUuid="retailerUuid" :licNo="licNo"></historyLvAssessDetail>
        </view>
      </scroll-view>
    </view>

    <u-tabbar :list="swiperList" :active-color="$theme.u_type_primary" icon-size="40" bg-color="#F3F4F5" :mid-button="false" v-model="current" @change="tabsChange"></u-tabbar>

  </view>
</template>
<script>
import historyEvalDetail from "./historyEvalDetail.vue";
import historyLvAssessDetail from "./historyLvAssessDetail.vue";
export default {
  components: {
    historyEvalDetail,
    historyLvAssessDetail
  },
  onLoad(opt) {
    this.retailerUuid = opt.retailerUuid;
    this.licNo = opt.licNo;
  },
  data() {
    return {
      tabIndex: 0,
      current: 0,
      // interval: 5000,
      // duration: 500,
      //   current: 0,
      retailerUuid: "",
      licNo: "",
      height: this.$u.sys().windowHeight - 70,
      swiperList: [
        {
          iconPath: "home",
          selectedIconPath: "home-fill",
          text: "信用分值变动",
          count: 0,
          isDot: false,
          customIcon: false
        },
        {
          iconPath: "edit-pen",
          selectedIconPath: "edit-pen-fill",
          text: "评定记录",
          count: 0, // 总数
          isDot: false,
          customIcon: false
        }
      ]
    };
  },
  methods: {
    swiperChange() {
      //   this.current = e.detail.current;
    },
    // 切换tabs刷新列表
    tabsChange(curr) {
      this.tabIndex = curr;
      // this.setRightBtns();
      // this.tabIndex == 0
      //   ? this.$refs["mescrollItem0"].refresh()
      //   : this.queryCheckData();
    },
    getScrollHeight() {
      let p = this.height - uni.upx2px(80) + "px";
      // #ifdef H5-WECHAT
      p = this.height + "px";
      // #endif
      return p;
    }
  }
};
</script>
<style scoped lang="scss">
</style>
